<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let  vilaDate = (cb)=>{      
        //do something
        if(false){
            cb(false)
        }
        if(false){
            cb(false)
        }
        if(true){
            new Promise((res)=>{
                    if(res.code){
                        cb(false)
                    }else{
                        cb(true);
                    }
            })

        }
    }  

    vilaDate((res)=>{
        alert(res)
    })


</script>
</html>